export const tryJSONParse = <T>(jsonStr: string) => {
  try {
    return JSON.parse(jsonStr) as T
  }
  catch (e) {
    console.error(e, jsonStr)
    return null
  }
}

export const filterTags = (v: string) => {
  return v.replace(/<(\w+)\s?[\s\S]*/, '')
}
